<?php if($act=='login') { ?>
<div class="pn-user" id="pn-login">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title text-center" id="myModalLabelLogin">Đăng Nhập</h4>
    </div>
    <p class="pprogress">
        <img src="<?php echo assets('images/loading.gif'); ?>" alt="loading" />
        <span class="text-danger">Đang xử lý ...</span>
    </p>
    <div class="modal-body">
        <form class="form-horizontal" role="form" method="post" action="<?php echo page_url('dang-nhap/do'); ?>">
            <div class="form-group">
                <div class="col-md-12">
                    <div id="login-message" class="alert alert-message alert-danger hidden"></div>
                </div>
            </div>

            <div class="form-group">
                <label for="username" class="col-md-3 control-label"><span class="text-danger">*</span> Tên đăng nhập</label>
                <div class="col-md-8">
                    <input type="text" autocomplete='off' maxlength="50" name="lg[username]" id="lusername" class="form-control can-submit" data-follow-submit='.login-btn' autofocus />
                </div>
            </div>
            <div class="clearfix"></div>

            <div class="form-group">
                <label for="password" class="col-md-3 control-label"><span class="text-danger">*</span> Mật khẩu</label>
                <div class="col-md-8">
                    <input type="password" autocomplete='off' maxlength="100" name="lg[password]" id="lpassword" class="form-control can-submit" data-follow-submit='.login-btn' />
                </div>
            </div>
            <div class="clearfix"></div>

            <div class="form-group">
                <div class="col-md-offset-3 col-md-8">
                    <div class="checkbox">
                        <label>
                            <input type="checkbox" name="rememberme"/> Ghi nhớ
                        </label>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-8 col-md-offset-3">
                    <button type="button" class="btn btn-primary login-btn"><i class='glyphicon glyphicon-ok-sign'></i>&nbsp;Đăng nhập</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal"><i class='glyphicon glyphicon-remove-sign'></i>&nbsp;Thoát</button>
                </div>
            </div>
            <div class='clearfix'></div>

            <div class="form-group">
                <div class="col-md-8 col-md-offset-3">
                    <a class="user-cmd" data-type="forget-password" href="<?php echo page_url('nguoi-dung', array('act'=>'forget_password')); ?>">
                        <i class="glyphicon glyphicon-repeat"></i>&nbsp;
                        Quên mật khẩu
                    </a>
                    &nbsp;|&nbsp;
                    <a class="user-cmd" data-type="signup" href="<?php echo page_url('nguoi-dung', array('act'=>'signup')); ?>" title='Đăng kí'>
            	  		<i class='glyphicon glyphicon-edit'></i>&nbsp;
            	  		Đăng kí
            	  	</a>
                </div>
            </div>
            <div class='clearfix'></div>
        </form>
    </div>
</div>
<?php } elseif($act=='signup') { ?>
<div class="pn-user" id="pn-signup">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title text-center" id="myModalLabelSignup">Đăng Kí</h4>
    </div>
    <p class="pprogress">
        <img src="<?php echo assets('images/loading.gif'); ?>" alt="loading" />
        <span class="text-danger">Đang xử lý ...</span>
    </p>
    <div class="modal-body">
        <form class="form-horizontal" role="form" method="post" action="<?php echo page_url('dang-ki/do'); ?>">
            <div class="form-group">
                <div class="col-md-12">
                    <div id="signup-message" class="alert alert-message alert-danger hidden"></div>                    
                </div>
            </div>
            <div class="form-group">
                <label for="full_name" class="col-md-3 control-label"><span class="text-danger">*</span> Họ và tên</label>
                <div class="col-md-8">
                    <input type="text" maxlength="50" name="signup[full_name]" id="full_name" class="form-control" autofocus />
                </div>
            </div>
            <div class="clearfix"></div>

            <div class="form-group">
                <label for="username" class="col-md-3 control-label"><span class="text-danger">*</span> Tên đăng nhập</label>
                <div class="col-md-8">
                    <input type="text" maxlength="50" name="signup[username]" id="username" class="form-control" />
                </div>
            </div>
            <div class="clearfix"></div>

            <div class="form-group">
                <label for="password" class="col-md-3 control-label"><span class="text-danger">*</span> Mật khẩu</label>
                <div class="col-md-8">
                    <input type="password" maxlength="100" name="signup[password]" id="password" class="form-control"/>
                </div>
            </div>
            <div class="clearfix"></div>

            <div class="form-group">
                <label for="repassword" class="col-md-3 control-label"><span class="text-danger">*</span> Xác nhận lại mật khẩu</label>
                <div class="col-md-8">
                    <input type="password" maxlength="100" name="repassword" id="repassword" class="form-control"/>
                </div>
            </div>
            <div class="clearfix"></div>

            <div class="form-group">
                <label for="email" class="col-md-3 control-label"><span class="text-danger">*</span> Email</label>
                <div class="col-md-8">
                    <input type="text" maxlength="150" name="signup[email]" id="email" class="form-control"/>
                    <h6>
                        <strong><span class="text-danger">*</span></strong>
                        Email bạn nhập phải có thực, <strong>Phiên Chợ Việt</strong> sẽ gửi mã kích hoạt vào email này.
                    </h6>
                    <p>(<span class='text-danger'>*</span>) không được để trống</p>
                </div>

            </div>
            <div class="clearfix"></div>

            <div class="form-group">
                <div class="col-md-8 col-md-offset-3">
                    <button type="button" class="btn btn-primary" id="signup-btn"><i class='glyphicon glyphicon-ok-sign'></i>&nbsp;Đăng kí</button>
                    <button type="button" class="btn btn-default btn-close-modal" data-dismiss="modal"><i class='glyphicon glyphicon-remove-sign'></i>&nbsp;Thoát</button>
                </div>
            </div>
            <div class='clearfix'></div>

            <div class="form-group">
                <div class="col-md-8 col-md-offset-3">
                    <a class="user-cmd" data-type="forget-password" href="<?php echo page_url('nguoi-dung', array('act'=>'forget_password')); ?>">
                        <i class="glyphicon glyphicon-repeat"></i>&nbsp;
                        Quên mật khẩu
                    </a>
                    &nbsp;|&nbsp;
                    <a class="user-cmd" data-type="login" href="<?php echo page_url('nguoi-dung', array('act'=>'login')); ?>" title='Đăng nhập'>
            	 		<i class='glyphicon glyphicon-log-in'></i>&nbsp;
            	 		Đăng nhập
            	 	</a>
                    &nbsp;|&nbsp;
                    <a href="<?php echo page_url('nguoi-ban-can-biet'); ?>">
                        <i class="glyphicon glyphicon-asterisk"></i>&nbsp;
                         Người bán cần biết
                    </a>
                </div>
            </div>
            <div class='clearfix'></div>
        </form>
    </div>
</div>
<?php } elseif($act=='forget_password') { ?>
<div class="pn-user" id="pn-forget-password">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title text-center" id="myModalLabelForgetPassword">Quên Mật Khẩu</h4>
    </div>
    <p class="pprogress">
        <img src="<?php echo assets('images/loading.gif'); ?>" alt="loading" />
        <span class="text-danger">Đang xử lý ...</span>
    </p>
    <div class="modal-body">
        <form class="form-horizontal" role="form" method="post" action="<?php echo page_url('quen-mat-khau/do'); ?>">
            <div class="form-group">
                <div class="col-md-12">
                    <div id="forget-password-message" class="alert alert-message alert-danger hidden"></div>
                </div>
            </div>

            <div class="form-group">
                <label for="username" class="col-md-3 control-label"><span class="text-danger">*</span> Email</label>
                <div class="col-md-8">
                    <input type="text" autocomplete='off' maxlength="50" name="email" id="email" class="form-control can-submit" data-follow-submit='.forget-pass-btn' autofocus />
                    <p>(<span class='text-danger'>*</span>) không được để trống</p>
                </div>
            </div>
            <div class="clearfix"></div>

            <div class="form-group">
                <div class="col-md-8 col-md-offset-3">
                    <button type="button" class="btn btn-primary forget-pass-btn" id="forget-password-btn"><i class='glyphicon glyphicon-ok-sign'></i>&nbsp;Gửi Email</button>
                    <button type="button" class="btn btn-default btn-close-modal" data-dismiss="modal"><i class='glyphicon glyphicon-remove-sign'></i>&nbsp;Thoát</button>
                </div>
            </div>
            <div class='clearfix'></div>

            <div class="form-group">
                <div class="col-md-8 col-md-offset-3">
                    <a class="user-cmd" data-type="login" href="<?php echo page_url('nguoi-dung', array('act'=>'login')); ?>" title='Đăng nhập'>
            	 		<i class='glyphicon glyphicon-log-in'></i>&nbsp;
            	 		Đăng nhập
            	 	</a>
                    &nbsp;|&nbsp;
            	  	<a class="user-cmd" data-type="signup" href="<?php echo page_url('nguoi-dung', array('act'=>'signup')); ?>" title='Đăng kí'>
            	  		<i class='glyphicon glyphicon-edit'></i>&nbsp;
            	  		Đăng kí
            	  	</a>
                </div>
            </div>
            <div class='clearfix'></div>
        </form>
    </div>
</div>
<?php } ?>